//
//  ScrollPictireViewController.m
//  QuLuoMianApp
//
//  Created by zyz on 2017/12/29.
//  Copyright © 2017年 科大讯飞. All rights reserved.
//

#import "ScrollPictireViewController.h"

@interface ScrollPictireViewController ()
@property (weak, nonatomic) IBOutlet UIScrollView *contentScrollView;


@property (weak, nonatomic) IBOutlet UIImageView *pictureIcon;

@end

@implementation ScrollPictireViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    self.title = @"锦囊攻略";
    
    UIImage * bgImage = [UIImage imageNamed:self.picture];
    
    CGSize imageSize = bgImage.size;
    
    CGFloat height = (imageSize.width * kScreenHeight ) / kScreenWidth;
    
    self.contentScrollView.contentSize = CGSizeMake(kScreenWidth, height);
    
    self.pictureIcon.frame = CGRectMake(0, 0, kScreenWidth, height);
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
